package com.example.texting;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class viewMessages extends Activity {

	Button exitBtn;
	TextView txtVw;
    private static final String TAG = "viewMessageLoaded";

	
	public void onCreate(Bundle tempState)
	{
		Log.i(TAG, " Start OnCreate");
		String Instructions;
		
		Instructions = "This is the Text Encryptor program for Android, Created by Tommy Fritz, Paul Scott, Sara Wells, and Nghia Nguyen." +
			"This program is made to encrypt your SMS text messages for privacy.  It " +
			"requires both users to be using this program to work.  It was created for our Software Engineering project" +
			"at Western Kentucky university.  Our website is http://people.wku.edu/paul.scott326/";

		super.onCreate(tempState);
		setContentView(R.layout.viewsms);
				
		Log.i(TAG, "Intent pass: ");
		
		txtVw = (TextView)findViewById(R.id.vwMsg);
		exitBtn = (Button) findViewById(R.id.btnRtn);

		txtVw.setText(Instructions);
		   
		// Notices when the close button is clicked and ends the activity
		exitBtn.setOnClickListener(new View.OnClickListener() 
		{
			public void onClick(View v) 
			{
		         setResult(RESULT_OK);
		         finish();
			}
		});
	
	}
	
	
}
